import request from '@/utils/request'

// 查询所有应知卡
export function listYingzhi(query) {
  return request({
    url: '/aqsc/yingzhi/list',
    method: 'get',
    params: query
  })
}

// 根据id查询应知卡详细
export function getYingzhi(id) {
  return request({
    url: '/aqsc/yingzhi/' + id,
    method: 'get'
  })
}

// 新增应知卡
export function addYingzhi(data) {
  return request({
    url: '/aqsc/yingzhi',
    method: 'post',
    data: data
  })
}

// 修改应知卡
export function updateYingzhi(data) {
  return request({
    url: '/aqsc/yingzhi',
    method: 'put',
    data: data
  })
}

// 删除应知卡
export function delYingzhi(yingzhiId) {
  return request({
    url: '/aqsc/yingzhi/' + yingzhiId,
    method: 'delete'
  })
}

//远程服务调用上传
export function uploadFile(data) {
  return request({
    url: '/aqsc/yingzhi/upload',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}


// 根据id添加上传信息
export function shangchuan(id,url) {
  return request({
    url: '/aqsc/yingzhi/shangchuan',
    params: {
      id: id,
      url: url
    },
    method: 'get'
  })
}
